package com.rex.saas.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class CacheWarmer implements ApplicationListener<ContextRefreshedEvent> {
    @Autowired
    private UserService userService;

    @Autowired
    private StrategyTaskService strategyTaskService;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
//        deviceService.syncProfileInfo();
//        strategyTaskService.refeshTriggerStrategyTask();
        userService.syncTenantMap();
    }
}
